Skip to main content

All Questions

2votes
1answer
583views

One and only one vs One in crow's foot notation

Am I using one and only one correctly? I have read so many articles online on differences between one and only one vs one and I'm still confused. I.e. a customer can exist with zero, 1 or many (...
Brendon's user avatar
11votes
13answers
5kviews

Does it ever make sense to have a one-to-one obligatory relationship in a relational database?

To illustrate what I mean, imagine a group of students and a group of professors in some kind of a traineeship. Every professor is to mentor one student and every student has to be mentored by one and ...
user24881603's user avatar
13votes
10answers
9kviews

Is there any benefit to a separate table that is one-to-one with the primary data table?

I've inherited a system with an Oracle relational database with a couple of tables modeled like I've sketched below, where there's an entire child table that only stores a single status code in a one-...
Kaypro II's user avatar
1vote
0answers
147views

Efficient way to implement hierarchical inheritance in SQL?

I am working in a database that has a hierarchy of Companies (From location-level all the way up to Top-level parent company). I am designing a system within that to provide a "subscription" ...
user2563087's user avatar
1vote
1answer
465views

How to represent NoSQL entities

I've mainly studied SQL structures, and I know that the representation of the entities can look something like this: However, I'm building this app with MongoDB, so NoSQL DB. I'm aware that MongoDB ...
fel.jim's user avatar
-3votes
1answer
124views

Where should linking tables be stored? [closed]

I have a system where properties can be stored, and linked with multiple other entities (each with their own schema). Let's say that Documents can be linked with Users and Assets. What is the best ...
mft25's user avatar
-1votes
2answers
221views

Difficulty understanding how denormalization results in more storage necessary

I am having difficulty understanding how denormalization results in more storage necessary. For example, let's say that in a normalized relation, there's Table 1 and Table 2. In order to join Table 1 ...
Henry Zhu's user avatar
1vote
3answers
2kviews

Storing count of child rows in parent table

I have two tables, parent and child. Parents can "have" multiple children—in our case they are related through a third table, parent_child_mapping rather than the child storing its parent id ...
Andrew Cheong's user avatar
4votes
3answers
2kviews

What benefit does a junction table provide over adding an additional field with a foreign key?

Consider this simple example: We have the apartments table below: ID Address 0 555 Maple St 1 123 Oak St 2 999 Pine St We also have the tenants table below: ID Name 0 Bob Foo 1 Jane Bar If I want to ...
jteezy14's user avatar
1vote
1answer
724views

Synchronizing Multiple Local SQL databases with Server

I'm trying to understand what general mechanisms and/or concepts are available in SQL database last to synchronize local. Here are my inputs and requirements. Multiple clients have a full copy of the ...
GisMofx's user avatar
2votes
2answers
276views

What is the best practice for hierarchical container - item relationship in a SQL database?

I am in the process of designing a database organizing real world items in different storage locations. One main principle is that items can contain other items. So the relevant table is: An "...
gaugau's user avatar
-2votes
2answers
113views

Select from many-to-many in one query

A common issue I run into when building CRUD applications is how to retrieve many-to-many relationships from the database and put them into an object model. Say, for example, I have the following data ...
Omegastick's user avatar
-3votes
1answer
158views

SQL Server: Which License? Any alternatives?

I'm working on a project which at the moment is not being used for any commercial purposes, and I'm managing the data by using a SQL Server Database. I read here that I should pay for it if I ever ...
Ferran R.'s user avatar
-2votes
1answer
74views

Design a database with multiple relations and tables

I'm struggling to find how to correctly design a database in order to store and retrieve data for my software. Basically, I'm designing an application for a gym (C++, MySQL with PhpMyAdmin): each user ...
Marcus Barnet's user avatar
1vote
1answer
4kviews

SQL Database schema for Catering/Menu management

Background I'm building a Private Chef booking service where you can book a Chef to cook you a custom Menu. I'm having trouble creating a SQL db schema that accurately represents the domain while ...
narciero's user avatar

153050per page
close